<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">

    <link rel="stylesheet" href="__HOME__/css/weui.css">
    <link rel="stylesheet" href="__HOME__/css/jquery-weui.css">
    <link rel="stylesheet" href="__HOME__/css/style.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_689900_jcdrhysqlt.css">

    <style>
        .weui-grid{width:25%;padding:6px 10px;}
        .weui-grid:before{border:0;}
        .weui-grid:after{border:0;}
        .back1{position: relative;}
        .sys{position: absolute;top:17px;right:17px;z-index: 10;}
        .sys .iconfont{font-size: 30px;color:#fff;}
        .weui-grid__icon{width: 65px;height: 65px;}
        .weui-grid__icon .iconfont{font-size: 65px;}
    </style>
</head>
<body class="back1">
<div class="sys" onclick="alert(123)">
    <i class="iconfont icon-saoyisao"></i>
</div>
<div class="swiper-container">
    <div class="swiper-wrapper">
        {if   $banner_info == null}
        <div class="swiper-slide">
            <a  href="#"  >
                <img src="__STATIC__/home/images/mrbanner.jpg"   style="width: 100%" alt="">
            </a>
        </div>
        {/if}
        {volist name="banner_info" id="vo"}
        <div class="swiper-slide">
            <a   href="{$vo['url']}">
                <img src="{$vo['pic_url']}" alt="">
            </a>
        </div>
        {/volist}
    </div>
    <div class="swiper-pagination"></div>
</div>

<div style="background: #fff;">
<div id="scrollDiv">
    <ul>
        {if   $notice_info == null}
        <li>暂无活动</li>
        {/if}
        {volist name="notice_info" id="vo"}
        <li>{$vo['title']}</li>
        {/volist}
    </ul>
</div>
</div>

<div class="weui-grids" style="background: #fff;margin-top: 5px;padding: 0 15px;">
    <a href="{:url('/store/checker.sign/hand_sign')}?shop_id={$shop_id}" class="weui-grid js_grid">
        <div class="weui-grid__icon">
            <i class="iconfont icon-iOS" style="color:#e91e63;"></i>
        </div>
        <p class="weui-grid__label">
            手动签到
        </p>
    </a>

    <!--<a href="javascript:;" class="weui-grid js_grid">-->
        <!--<div class="weui-grid__icon">-->
            <!--<i class="iconfont icon-iOS" style="color:#2196f3;"></i>-->
        <!--</div>-->
        <!--<p class="weui-grid__label">-->
            <!--我的团队-->
        <!--</p>-->
    <!--</a>-->
</div>

    <div class="mb70"></div>
    <div class="weui-flex weui-fixed-btm">
        <div class="weui-flex__item">
            <a href="javascript:;" class="weui-fixed-btn weui-btn_primary">
                <i class="iconfont icon-shouyefill"></i>
                <p>首页</p>
            </a>
        </div>
        <div class="weui-flex__item">
            <a href="{:url('mycenter')}?shop_id={$shop_id}" class="weui-fixed-btn">
                <i class="iconfont icon-yonghu"></i>
                <p>用户中心</p>
            </a>
        </div>
    </div>
<script src="__HOME__/js/jweixin-1.2.0.js"></script>
<script src="__HOME__/js/jquery.min.js"></script>
<script src="__HOME__/js/jquery-weui.min.js"></script>


<script src="__HOME__/js/swiper.min.js"></script>
<script>

    wx.config({
        debug: false,
        appId: '{$jsconfig.appId}',
        timestamp: '{$jsconfig.timestamp}',
        nonceStr: '{$jsconfig.noncestr}',
        signature: '{$jsconfig.signature}',
        jsApiList: [
            'checkJsApi',
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ',
            'onMenuShareWeibo',
            'hideMenuItems',
            'showMenuItems',
            'hideAllNonBaseMenuItem',
            'showAllNonBaseMenuItem',
            'translateVoice',
            'startRecord',
            'stopRecord',
            'onRecordEnd',
            'playVoice',
            'pauseVoice',
            'stopVoice',
            'uploadVoice',
            'downloadVoice',
            'chooseImage',
            'previewImage',
            'uploadImage',
            'downloadImage',
            'getNetworkType',
            'openLocation',
            'getLocation',
            'hideOptionMenu',
            'showOptionMenu',
            'closeWindow',
            'scanQRCode',
            'chooseWXPay',
            'openProductSpecificView',
            'addCard',
            'chooseCard',
            'openCard'
        ]
    });
    wx.isInit = false;

    /**
     *  学生签到
     */
    function weixin_qr() {
        wx.scanQRCode({
            desc: 'scanQRCode desc',
            needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
            success: function (res) {
                var data = JSON.stringify(res);
                if(res.errMsg === 'scanQRCode:ok'){
                    $.post(
                        "{:url('/store/checker.sign/student_sign')}",
                        {
                            data:data
                        },
                        function (res) {
                            if(res.code===1){
                                $.toast(res.msg);

                                //                                    , function () {
//                                    location.href = "{:url('index')}";
//                                }
//
                            } else {

                                $.toast(res.msg
//                                    ,function () {
//                                    location.href = "{:url('index')}";
//                                }
                                );
                            }
                        }
                    );

                }else{
                    alert("二维码信息有误");
                }

            }
        });
    }

</script>

<script>
    var mySwiper = new Swiper('.swiper-container', {
        autoplay: 3000,//可选选项，自动滑动
        speed:500,  //滑动速度
        pagination : '.swiper-pagination', // 分页器
        paginationType : 'bullets', //fraction 数字分页坐标  bullets 加点页坐标
        loop:true, // 连续循环
        autoplayDisableOnInteraction : false, // 滑动后继续滑动
        //autoHeight: true, //高度随内容变化
    });
    function AutoScroll(obj){
        $(obj).find("ul:first").animate({
            marginTop:"-40px"
        },500,function(){
            $(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
        });
    }
    $(document).ready(function(){
        setInterval('AutoScroll("#scrollDiv")',3000);
    });
</script>


</body>
</html>

